package com.lyx.exercise_io;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;

public class Digital {
    public static void main(String[] args) throws IOException {
        PrintWriter pw = new PrintWriter(new FileWriter("c:\\developer\\myTest.txt"));
        int a;
        int[] n = new int[10];
        for (int i = 0;i<10;i++){
            n[i] = (int) (Math.random()*51);
        }
        Arrays.sort(n);

        for (int j =0;j<n.length;j++){
            pw.println(n[j]);
            System.out.println(n[j]+" ");
        }
        pw.close();
    }
}
